package utility;

import java.sql.ResultSet;
import java.sql.SQLException;


import dbmanager.DBManager;
import dbmanager.GetIdName;

public class DebugWithText
{
	
	public DebugWithText(int fromId) 
	{
		DBManager db = new DBManager();
		db.getConnect();
		GetIdName gin = new GetIdName(db);
		
		ResultSet rs = db.getSelect("Select * from property_details where mid="+11196+" order by id");
		//ResultSet rs = db.getSelect("select *  FROM property_details  where pid= 4203 order by mid");
		try 
		{
			while(rs.next())
			{
				String id = rs.getString("id");
				String MidText = gin.getItem(rs.getString("mid"));
				String PidText = gin.getItem(rs.getString("pid"));
				String PvText = gin.getItem(rs.getString("pv"));
				String RefText = gin.getItem(rs.getString("ref"));
				db.getUpdate("update property_details set midtext='"+MidText+"', pidtext='"+PidText+"', pvtext='"+PvText+"', Reftext='"+RefText+"' where id='"+id+"' ");
			}
		}
		catch (Exception e) {
		}
	}
	public static void main(String[] args) 
	{
		int i;
		for(i=40057;i<=40070;i++)
		{
		new DebugWithText(i);
		}
	}
}
